/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.aliyuncs.itag.transform.v20210517;

import com.aliyuncs.itag.model.v20210517.ProxyRobotServiceResponse;
import com.aliyuncs.itag.model.v20210517.ProxyRobotServiceResponse.Result;
import java.util.Map;
import com.aliyuncs.transform.UnmarshallerContext;


public class ProxyRobotServiceResponseUnmarshaller {

	public static ProxyRobotServiceResponse unmarshall(ProxyRobotServiceResponse proxyRobotServiceResponse, UnmarshallerContext _ctx) {
		
		proxyRobotServiceResponse.setRequestId(_ctx.stringValue("ProxyRobotServiceResponse.RequestId"));
		proxyRobotServiceResponse.setCode(_ctx.stringValue("ProxyRobotServiceResponse.Code"));
		proxyRobotServiceResponse.setErrInfo(_ctx.stringValue("ProxyRobotServiceResponse.ErrInfo"));
		proxyRobotServiceResponse.setMsg(_ctx.stringValue("ProxyRobotServiceResponse.Msg"));
		proxyRobotServiceResponse.setSucc(_ctx.booleanValue("ProxyRobotServiceResponse.Succ"));
		proxyRobotServiceResponse.setErrorCode(_ctx.stringValue("ProxyRobotServiceResponse.ErrorCode"));

		Result result = new Result();
		result.setSucc(_ctx.booleanValue("ProxyRobotServiceResponse.Result.Succ"));
		result.setData(_ctx.mapValue("ProxyRobotServiceResponse.Result.Data"));
		result.setMsg(_ctx.stringValue("ProxyRobotServiceResponse.Result.Msg"));
		result.setRobotCode(_ctx.stringValue("ProxyRobotServiceResponse.Result.RobotCode"));
		proxyRobotServiceResponse.setResult(result);
	 
	 	return proxyRobotServiceResponse;
	}
}